﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Com.CloudTalk.Data
{
    public partial class Role
    {
        public static Role GetRoleByName(string _sName)
        {
            using (CloudTalkEntities db = new CloudTalkEntities())
            {
                Role type = db.Role
                    .Where(t => t.Name == _sName)
                    .FirstOrDefault();

                db.Detach(type);

                return type;
            }
        }
    }
}
